package org.example.controller;

import org.example.event.DemoPublisher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoEventController {

    @Autowired
    DemoPublisher demoPublisher;

    @GetMapping("/publish")
    public String publish() {
        demoPublisher.publish("just do it");
        return "success";
    }
}
